package pc15;

public class J05Ex30Gugudan {

	public static void main(String[] args) {
		// 1. 변수선언
		int result;
		String resultC;

		// 2. 계산 및 출력
		System.out.println("   Multiplication Table   ");
		System.out.println("    1  2  3  4  5  6  7  8  9");
		System.out.println("-----------------------------");
		for (int j = 1; j <= 9; ++j) {
			System.out.print(j + "|");
			for (int i = 1; i <= 9; ++i) {
				result = i * j;
				if (result > 9)
					resultC = " " + result;
				else
					resultC = "  " + result;
				System.out.print(resultC);
				//System.out.printf("%3d",result);
			}//i end
			System.out.println("");
		}//j end
	}
}
